package cn.xuan.hello.hellocontroller;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.xuan.hello.service.HelloService;

@Controller
public class HelloController {
	
	@Autowired
	private HelloService service;
	
	
	@ResponseBody
	@RequestMapping(value="/hello",method=RequestMethod.GET)
	public Map<String,String> getHello(){
		
		Map<String,String> map = new HashMap<String,String>();
		map.put("hello", service.getHello());
		
		
		
		
		return map;
		
	}
	
	@RequestMapping(value="/index",method=RequestMethod.GET)
	public String getIndex(){
		return "index";
	}
	
	

}
